<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // 简单数据类型 BigInt（）
        // 构造函数， 代码可读性
        const wes = Symbol('Wes');
        const person = Symbol('Wes');
        // console.log(wes === person);
        const classRoom = {
            [Symbol('Mark')]: { grade: 50, gender: 'male' },
            [Symbol('oliva')]: { grade: 80, gender: 'female' },
            [Symbol('oliva')]: { grade: 90, gender: 'female' },
            "dl": ["国文","陈老板"]
        }
        // console.log(classRoom);
        // for key in // 专属遍历对象
        // symbol key 不可以被枚举
        for (const person in classRoom) {
            console.log(person,'////');
        } // 输出dl symbol 不可以枚举

        const syms = Object.getOwnPropertySymbols(classRoom);
        // console.log(syms,'////');
        const data = syms.map(sym => classRoom[sym]);
        console.log(data,'////');
    </script>
</body>
</html>